package HouseTest.javaBean;

public class House {
    private    int id;
    private  String name;         // 姓名
    private  String phoneNumber;  // 电话号码
    private  String address;      // 地址
    private  double money;        // 月租
    private int state;       // 状态

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public House() {
    }

    public House(String name, String phoneNumber, String address, double money, int state,int id) {
        this.name = name;
        this.phoneNumber = phoneNumber;
        this.address = address;
        this.money = money;
        this.state = state;
        this.id=id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public double getMoney() {
        return money;
    }

    public void setMoney(double money) {
        this.money = money;
    }

    public String isSt() {
        return state==1? "已出租" : "未出租" ;
    }

    public int getState() {
        return  state;
    }

    public void setState(boolean state) {
        if(state){
            this.state=1;
        }else {
            this.state=0;
        }
    }
    @Override
    public String toString() {
        return id+"\t\t"+ name+ "\t\t" + phoneNumber + "\t\t" + address + "\t" + money + "\t\t" + isSt();
    }
}
